package com.dianrui.fmi.activity;

import android.annotation.SuppressLint;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dianrui.fmi.R;
import com.dianrui.fmi.UpdateApp;
import com.dianrui.fmi.util.MyUtil;

import butterknife.BindView;
import butterknife.OnClick;

public class AboutActivity extends BaseActivity {

    @BindView(R.id.title)
    TextView title;
    @BindView(R.id.ver)
    TextView ver;
    @BindView(R.id.show_ver_txt)
    TextView showVerTxt;
    @BindView(R.id.img)
    ImageView img;


    @Override
    public int getContentViewId() {
        return R.layout.activity_about;
    }

    @SuppressLint("SetTextI18n")
    @Override
    public void initView() {
        title.setText(getString(R.string.about));
        ver.setText(MyUtil.getAppVersionName(AboutActivity.this));
        showVerTxt.setText(MyUtil.getAppVersionName(AboutActivity.this));
    }


    @OnClick({R.id.back, R.id.click_update})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;

            case R.id.click_update:
                UpdateApp.checkUpdate(AboutActivity.this, true, true);
                break;

            default:
                break;

        }
    }


}
